import request from '@/utils/request'

const api_name = '/memberservice/member';

export default {

  //分页条件查询
  pageMemberList(current, limit, memberQuery) {
    return request({
      url: `${api_name}/pageList/${current}/${limit}`,
      method: 'post',
      data: memberQuery
    })
  },

  //新增会员
  saveMember(memberForm) {
    return request({
      url: `${api_name}/saveMember`,
      method: 'post',
      data: memberForm
    })
  },

  //根据id查询会员
  getMemberById(id) {
    return request({
      url: `${api_name}/getMemberById/${id}`,
      method: 'get',
    })
  },

  //修改
  updateMember(memberForm) {
    return request({
      url: `${api_name}/updateMember`,
      method: 'put',
      data: memberForm
    })
  },

  //根据id查询会员
  removeMemberById(id) {
    return request({
      url: `${api_name}/removeMemberById/${id}`,
      method: 'delete',
    })
  },
}
